package com.ruoyi.common.utils;

import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * @author qiuwencong
 * @Date 2022/1/4 10:53
 * @Package com.ruoyi.common.utils
 * @Description
 */
public class SortUtils {

    public static void sort(BaseEntity entity) {
        if (entity.getParams().containsKey(Constants.FIELD)) {
            String value = (String) entity.getParams().get(Constants.FIELD);
            entity.getParams().replace(Constants.FIELD, StringUtils.toUnderScoreCase(value));
        }
    }
}
